unit UCadBanco;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Modelo, DB, DBTables, Grids, DBGrids, StdCtrls, Buttons,
  CheckLst, ExtCtrls, Mask, DBCtrls, UDPTOUteis;

type
  TFCadBancos = class(TFModelo)
    intgrfldPadraoBANID: TIntegerField;
    strngfldPadraoBANDESCRICAO: TStringField;
    lbl1: TLabel;
    dbedtBANID: TDBEdit;
    lbl2: TLabel;
    dbedtBANDESCRICAO: TDBEdit;
    procedure BtNovoClick(Sender: TObject);
    procedure qPadraoAfterInsert(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FCadBancos: TFCadBancos;

implementation

{$R *.dfm}

procedure TFCadBancos.BtNovoClick(Sender: TObject);
begin
  inherited;
  dbedtBANDESCRICAO.SetFocus;
end;

procedure TFCadBancos.qPadraoAfterInsert(DataSet: TDataSet);
begin
  inherited;
  qPadrao.FieldByName('BANID').AsInteger := DPTOProximo('BANCO');
end;

end.
